`ifndef AHBL_MST_SEQLIB_SV
`define AHBL_MST_SEQLIB_SV


class ahbl_mst_base_seq extends uvm_sequence #(ahbl_transaction);

	ahbl_transaction req;

	`uvm_object_utils(ahbl_mst_base_seq)
  
	function new(string name = "ahbl_mst_base_seq");
		super.new(name);
	endfunction : new

	virtual task pre_body();
		if(starting_phase != null) begin
			starting_phase.raise_objection(this);
		end
	endtask : pre_body

	virtual task post_body();
		if(starting_phase != null) begin
			starting_phase.drop_objection(this);
		end
	endtask : post_body

endclass : ahbl_mst_base_seq

//----------------------------------------
class ahbl_mst_single_write32_seq extends ahbl_mst_base_seq;
	
	`uvm_object_utils(ahbl_mst_single_write32_seq)

	function new(string name = "ahbl_mst_single_write32_seq");
		super.new(name);
	endfunction : new

	virtual task body();
		`uvm_do_with(req, { hsel	 == 1'b1;
												hwrite == 1'b1;
												htrans == NONSEQUENTIAL;
												hsize  == TRANS_SIZE_32BIT;
												hburst == SINGLE;
											})
	endtask : body

endclass : ahbl_mst_single_write32_seq

//----------------------------------------
class ahbl_mst_single_read32_seq extends ahbl_mst_base_seq;

	`uvm_object_utils(ahbl_mst_single_read32_seq)

	function new(string name = "ahbl_mst_single_read32_seq");
		super.new(name);
	endfunction : new

	virtual task body();
		`uvm_do_with(req, { hsel	 == 1'b1;
												hwrite == 1'b0;
												htrans == NONSEQUENTIAL;
												hsize  == TRANS_SIZE_32BIT;
												hburst == SINGLE;
											})
	endtask : body
endclass : ahbl_mst_single_read32_seq

//----------------------------------------
class ahbl_mst_simple_burst_seq extends ahbl_mst_base_seq;

	`uvm_object_utils(ahbl_mst_simple_burst_seq)

	function new(string name = "ahbl_mst_simple_burst_seq");
		super.new(name);
	endfunction : new

	virtual task body();
		`uvm_do_with(req,	{ hsel == 1'b1;
												hburst inside {[2:7]};
											})
	endtask : body

endclass : ahbl_mst_simple_burst_seq

//----------------------------------------
class ahbl_mst_write_h0000_seq extends ahbl_mst_base_seq;

	`uvm_object_utils(ahbl_mst_write_h0000_seq)

	function new(string name = "ahbl_mst_write_h0000_seq");
		super.new(name);
	endfunction : new

	virtual task body();
		`uvm_do_with(req,	{ hsel == 1'b1;
												addr == 'h0000;
												hwrite == 1'b1;
												hsize  == TRANS_SIZE_16BIT;
												hburst == SINGLE;
											})
	endtask : body

endclass : ahbl_mst_write_h0000_seq

//----------------------------------------
class ahbl_mst_read_hFFFF_seq extends ahbl_mst_base_seq;

	`uvm_object_utils(ahbl_mst_read_hFFFF_seq)

	function new(string name = "ahbl_mst_read_hFFFF_seq");
		super.new(name);
	endfunction : new

	virtual task body();
		`uvm_do_with(req,	{ hsel == 1'b1;
												addr == 'hFFFF;
												hwrite == 1'b0;
												hburst == SINGLE;
											})
	endtask : body

endclass : ahbl_mst_read_hFFFF_seq

`endif // AHBL_MST_SEQLIB_SV
